import { useSearchParams } from "react-router-dom"
const Article = () => {
    // 接收searchParams参数
    const [params] = useSearchParams()
    const id = params.get('id')
    const name = params.get('name')
    return (
        <div> 我是 文章 组件 
            <div>searchParams参数</div>
            id:{id}
            name:{name}
        </div>
    )
}
export default Article